package com.rotsel.mh3udb.app.DataSource;


import com.rotsel.mh3udb.app.R;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by rots on 31.01.14.
 */
public final class PicCol {
    private static Map<Integer, Integer> weaponTypeMap;

    public static int getWpnTypePicByWpnTypeId(int id){
        if(weaponTypeMap == null){
            initWeaponTypeMap();
        }
        Integer picId = weaponTypeMap.get(id);
        return picId == null ? 0 : picId;
    }
    private static void initWeaponTypeMap(){
        weaponTypeMap = new HashMap<Integer, Integer>(12);

        weaponTypeMap.put(1, R.drawable.sns_icon);
        weaponTypeMap.put(2, R.drawable.ds_icon);
        weaponTypeMap.put(3, R.drawable.lbg_icon);
        weaponTypeMap.put(4, R.drawable.hbg_icon);
        weaponTypeMap.put(5, R.drawable.bow_icon);
        weaponTypeMap.put(6, R.drawable.gs_icon);
        weaponTypeMap.put(7, R.drawable.ls_icon);
        weaponTypeMap.put(8, R.drawable.lance_icon);
        weaponTypeMap.put(9, R.drawable.gl_icon);
        weaponTypeMap.put(10, R.drawable.hammer_icon);
        weaponTypeMap.put(11, R.drawable.hh_icon);
        weaponTypeMap.put(12, R.drawable.sa_icon);
    }


    private static Map<Integer, Integer> elementMap;

    public static int getElementIconById(int id){
        if(elementMap == null){
            initElementMap();
        }
        Integer picId = elementMap.get(id);
        return picId == null ? 0 : picId;
    }
    private static void initElementMap(){
        elementMap = new HashMap<Integer, Integer>();
        //TODO: put images to drawable and initialize them
    }

}
